﻿var utils = {
    windowSize: function() {
        var iMyWidth = 0, iMyHeight = 0;
        if (typeof (window.innerWidth) == 'number') {
            //Non-IE
            iMyWidth = window.innerWidth;
            iMyHeight = window.innerHeight;
        } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
            //IE 6+ in 'standards compliant mode'
            iMyWidth = document.documentElement.clientWidth;
            iMyHeight = document.documentElement.clientHeight;
        } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
            //IE 4 compatible
            iMyWidth = document.body.clientWidth;
            iMyHeight = document.body.clientHeight;
        }
        return [iMyWidth, iMyHeight];
    } 
}